home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / xpcom / nsIComponentLoader.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  10KB  |  230 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIComponentLoader.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIComponentLoader_h__
  6. #define __gen_nsIComponentLoader_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. #ifndef __gen_nsIFactory_h__
  14. #include "nsIFactory.h"
  15. #endif
  16.  
  17. #ifndef __gen_nsIFile_h__
  18. #include "nsIFile.h"
  19. #endif
  20.  
  21. #ifndef __gen_nsIComponentManager_h__
  22. #include "nsIComponentManager.h"
  23. #endif
  24.  
  25. /* For IDL files that don't want to include root IDL files. */
  26. #ifndef NS_NO_VTABLE
  27. #define NS_NO_VTABLE
  28. #endif
  29.  
  30. /* starting interface:    nsIComponentLoader */
  31. #define NS_ICOMPONENTLOADER_IID_STR "c073cfc0-567c-11d3-aec1-0000f8e25c06"
  32.  
  33. #define NS_ICOMPONENTLOADER_IID \
  34.   {0xc073cfc0, 0x567c, 0x11d3, \
  35.     { 0xae, 0xc1, 0x00, 0x00, 0xf8, 0xe2, 0x5c, 0x06 }}
  36.  
  37. class NS_NO_VTABLE nsIComponentLoader : public nsISupports {
  38.  public: 
  39.  
  40.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICOMPONENTLOADER_IID)
  41.  
  42.   /**
  43.      * Get the factory for a given component.
  44.      */
  45.   /* nsIFactory getFactory (in nsIIDRef aCID, in string aLocation, in string aType); */
  46.   NS_IMETHOD GetFactory(const nsIID & aCID, const char *aLocation, const char *aType, nsIFactory **_retval) = 0;
  47.  
  48.   /**
  49.      * Initialize the loader.
  50.      *
  51.      * We use nsISupports here because nsIRegistry isn't IDLized yet.
  52.      */
  53.   /* void init (in nsIComponentManager aCompMgr, in nsISupports aRegistry); */
  54.   NS_IMETHOD Init(nsIComponentManager *aCompMgr, nsISupports *aRegistry) = 0;
  55.  
  56.   /**
  57.      * Called when a component of the appropriate type is registered,
  58.      * to give the component loader an opportunity to do things like
  59.      * annotate the registry and such.
  60.      */
  61.   /* void onRegister (in nsIIDRef aCID, in string aType, in string aClassName, in string aContractID, in string aLocation, in boolean aReplace, in boolean aPersist); */
  62.   NS_IMETHOD OnRegister(const nsIID & aCID, const char *aType, const char *aClassName, const char *aContractID, const char *aLocation, PRBool aReplace, PRBool aPersist) = 0;
  63.  
  64.   /**
  65.      * When is AutoRegistration occuring?
  66.      */
  67.   enum { Startup = 0 };
  68.  
  69.   enum { Component = 1 };
  70.  
  71.   enum { Timer = 2 };
  72.  
  73.   /**
  74.      * AutoRegister components in the given directory.
  75.      */
  76.   /* void autoRegisterComponents (in long aWhen, in nsIFile aDirectory); */
  77.   NS_IMETHOD AutoRegisterComponents(PRInt32 aWhen, nsIFile *aDirectory) = 0;
  78.  
  79.   /**
  80.      * AutoRegister the given component.
  81.      *
  82.      * Returns true if the component was registered, false if it couldn't
  83.      * attempt to register the component (wrong type) and ``throws'' an
  84.      * NS_FAILED code if there was an error during registration.
  85.      */
  86.   /* boolean autoRegisterComponent (in long aWhen, in nsIFile aComponent); */
  87.   NS_IMETHOD AutoRegisterComponent(PRInt32 aWhen, nsIFile *aComponent, PRBool *_retval) = 0;
  88.  
  89.   /**
  90.      * AutoUnregister the given component.
  91.      * Returns true if the component was unregistered, false if it coudln't
  92.      * attempt to unregister the component (not found, wrong type).
  93.      */
  94.   /* boolean autoUnregisterComponent (in long aWhen, in nsIFile aComponent); */
  95.   NS_IMETHOD AutoUnregisterComponent(PRInt32 aWhen, nsIFile *aComponent, PRBool *_retval) = 0;
  96.  
  97.   /**
  98.      * Register any deferred (NS_ERROR_FACTORY_REGISTER_AGAIN) components.
  99.      * Return registered-any-components?
  100.      */
  101.   /* boolean registerDeferredComponents (in long aWhen); */
  102.   NS_IMETHOD RegisterDeferredComponents(PRInt32 aWhen, PRBool *_retval) = 0;
  103.  
  104.   /**
  105.      * Unload all components that are willing.
  106.      */
  107.   /* void unloadAll (in long aWhen); */
  108.   NS_IMETHOD UnloadAll(PRInt32 aWhen) = 0;
  109.  
  110. };
  111.  
  112. /* Use this macro when declaring classes that implement this interface. */
  113. #define NS_DECL_NSICOMPONENTLOADER \
  114.   NS_IMETHOD GetFactory(const nsIID & aCID, const char *aLocation, const char *aType, nsIFactory **_retval); \
  115.   NS_IMETHOD Init(nsIComponentManager *aCompMgr, nsISupports *aRegistry); \
  116.   NS_IMETHOD OnRegister(const nsIID & aCID, const char *aType, const char *aClassName, const char *aContractID, const char *aLocation, PRBool aReplace, PRBool aPersist); \
  117.   NS_IMETHOD AutoRegisterComponents(PRInt32 aWhen, nsIFile *aDirectory); \
  118.   NS_IMETHOD AutoRegisterComponent(PRInt32 aWhen, nsIFile *aComponent, PRBool *_retval); \
  119.   NS_IMETHOD AutoUnregisterComponent(PRInt32 aWhen, nsIFile *aComponent, PRBool *_retval); \
  120.   NS_IMETHOD RegisterDeferredComponents(PRInt32 aWhen, PRBool *_retval); \
  121.   NS_IMETHOD UnloadAll(PRInt32 aWhen); 
  122.  
  123. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  124. #define NS_FORWARD_NSICOMPONENTLOADER(_to) \
  125.   NS_IMETHOD GetFactory(const nsIID & aCID, const char *aLocation, const char *aType, nsIFactory **_retval) { return _to GetFactory(aCID, aLocation, aType, _retval); } \
  126.   NS_IMETHOD Init(nsIComponentManager *aCompMgr, nsISupports *aRegistry) { return _to Init(aCompMgr, aRegistry); } \
  127.   NS_IMETHOD OnRegister(const nsIID & aCID, const char *aType, const char *aClassName, const char *aContractID, const char *aLocation, PRBool aReplace, PRBool aPersist) { return _to OnRegister(aCID, aType, aClassName, aContractID, aLocation, aReplace, aPersist); } \
  128.   NS_IMETHOD AutoRegisterComponents(PRInt32 aWhen, nsIFile *aDirectory) { return _to AutoRegisterComponents(aWhen, aDirectory); } \
  129.   NS_IMETHOD AutoRegisterComponent(PRInt32 aWhen, nsIFile *aComponent, PRBool *_retval) { return _to AutoRegisterComponent(aWhen, aComponent, _retval); } \
  130.   NS_IMETHOD AutoUnregisterComponent(PRInt32 aWhen, nsIFile *aComponent, PRBool *_retval) { return _to AutoUnregisterComponent(aWhen, aComponent, _retval); } \
  131.   NS_IMETHOD RegisterDeferredComponents(PRInt32 aWhen, PRBool *_retval) { return _to RegisterDeferredComponents(aWhen, _retval); } \
  132.   NS_IMETHOD UnloadAll(PRInt32 aWhen) { return _to UnloadAll(aWhen); } 
  133.  
  134. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  135. #define NS_FORWARD_SAFE_NSICOMPONENTLOADER(_to) \
  136.   NS_IMETHOD GetFactory(const nsIID & aCID, const char *aLocation, const char *aType, nsIFactory **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFactory(aCID, aLocation, aType, _retval); } \
  137.   NS_IMETHOD Init(nsIComponentManager *aCompMgr, nsISupports *aRegistry) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(aCompMgr, aRegistry); } \
  138.   NS_IMETHOD OnRegister(const nsIID & aCID, const char *aType, const char *aClassName, const char *aContractID, const char *aLocation, PRBool aReplace, PRBool aPersist) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnRegister(aCID, aType, aClassName, aContractID, aLocation, aReplace, aPersist); } \
  139.   NS_IMETHOD AutoRegisterComponents(PRInt32 aWhen, nsIFile *aDirectory) { return !_to ? NS_ERROR_NULL_POINTER : _to->AutoRegisterComponents(aWhen, aDirectory); } \
  140.   NS_IMETHOD AutoRegisterComponent(PRInt32 aWhen, nsIFile *aComponent, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->AutoRegisterComponent(aWhen, aComponent, _retval); } \
  141.   NS_IMETHOD AutoUnregisterComponent(PRInt32 aWhen, nsIFile *aComponent, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->AutoUnregisterComponent(aWhen, aComponent, _retval); } \
  142.   NS_IMETHOD RegisterDeferredComponents(PRInt32 aWhen, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterDeferredComponents(aWhen, _retval); } \
  143.   NS_IMETHOD UnloadAll(PRInt32 aWhen) { return !_to ? NS_ERROR_NULL_POINTER : _to->UnloadAll(aWhen); } 
  144.  
  145. #if 0
  146. /* Use the code below as a template for the implementation class for this interface. */
  147.  
  148. /* Header file */
  149. class nsComponentLoader : public nsIComponentLoader
  150. {
  151. public:
  152.   NS_DECL_ISUPPORTS
  153.   NS_DECL_NSICOMPONENTLOADER
  154.  
  155.   nsComponentLoader();
  156.  
  157. private:
  158.   ~nsComponentLoader();
  159.  
  160. protected:
  161.   /* additional members */
  162. };
  163.  
  164. /* Implementation file */
  165. NS_IMPL_ISUPPORTS1(nsComponentLoader, nsIComponentLoader)
  166.  
  167. nsComponentLoader::nsComponentLoader()
  168. {
  169.   /* member initializers and constructor code */
  170. }
  171.  
  172. nsComponentLoader::~nsComponentLoader()
  173. {
  174.   /* destructor code */
  175. }
  176.  
  177. /* nsIFactory getFactory (in nsIIDRef aCID, in string aLocation, in string aType); */
  178. NS_IMETHODIMP nsComponentLoader::GetFactory(const nsIID & aCID, const char *aLocation, const char *aType, nsIFactory **_retval)
  179. {
  180.     return NS_ERROR_NOT_IMPLEMENTED;
  181. }
  182.  
  183. /* void init (in nsIComponentManager aCompMgr, in nsISupports aRegistry); */
  184. NS_IMETHODIMP nsComponentLoader::Init(nsIComponentManager *aCompMgr, nsISupports *aRegistry)
  185. {
  186.     return NS_ERROR_NOT_IMPLEMENTED;
  187. }
  188.  
  189. /* void onRegister (in nsIIDRef aCID, in string aType, in string aClassName, in string aContractID, in string aLocation, in boolean aReplace, in boolean aPersist); */
  190. NS_IMETHODIMP nsComponentLoader::OnRegister(const nsIID & aCID, const char *aType, const char *aClassName, const char *aContractID, const char *aLocation, PRBool aReplace, PRBool aPersist)
  191. {
  192.     return NS_ERROR_NOT_IMPLEMENTED;
  193. }
  194.  
  195. /* void autoRegisterComponents (in long aWhen, in nsIFile aDirectory); */
  196. NS_IMETHODIMP nsComponentLoader::AutoRegisterComponents(PRInt32 aWhen, nsIFile *aDirectory)
  197. {
  198.     return NS_ERROR_NOT_IMPLEMENTED;
  199. }
  200.  
  201. /* boolean autoRegisterComponent (in long aWhen, in nsIFile aComponent); */
  202. NS_IMETHODIMP nsComponentLoader::AutoRegisterComponent(PRInt32 aWhen, nsIFile *aComponent, PRBool *_retval)
  203. {
  204.     return NS_ERROR_NOT_IMPLEMENTED;
  205. }
  206.  
  207. /* boolean autoUnregisterComponent (in long aWhen, in nsIFile aComponent); */
  208. NS_IMETHODIMP nsComponentLoader::AutoUnregisterComponent(PRInt32 aWhen, nsIFile *aComponent, PRBool *_retval)
  209. {
  210.     return NS_ERROR_NOT_IMPLEMENTED;
  211. }
  212.  
  213. /* boolean registerDeferredComponents (in long aWhen); */
  214. NS_IMETHODIMP nsComponentLoader::RegisterDeferredComponents(PRInt32 aWhen, PRBool *_retval)
  215. {
  216.     return NS_ERROR_NOT_IMPLEMENTED;
  217. }
  218.  
  219. /* void unloadAll (in long aWhen); */
  220. NS_IMETHODIMP nsComponentLoader::UnloadAll(PRInt32 aWhen)
  221. {
  222.     return NS_ERROR_NOT_IMPLEMENTED;
  223. }
  224.  
  225. /* End of implementation class template. */
  226. #endif
  227.  
  228.  
  229. #endif /* __gen_nsIComponentLoader_h__ */
  230.